#pragma once
#include "Coordinates.h"
#include "Edge.h"
namespace HW2{
	struct Normal
	{
		bool exists;
		Coordinates unitVector;
		Normal() : exists(false) {}
		Normal(Coordinates &unitVector): unitVector(unitVector), exists(true) {}
		Edge computeEdge(Coordinates& start, double length, Color &color)
		{
			double ratio = length / unitVector.norm();
			unitVector *= ratio;
			return Edge(start, start + unitVector, color);
		}
		Normal inverse()
		{
			Coordinates c = unitVector;
			c*=-1;
			return Normal(c);
		}
	};
}

